package com.everyday.practice.leetCode;

public class Title70 {
    public static void main(String[] args) {
        System.out.println(climStairs(5));
    }
    public static int climStairs(int n){
        int t1=1;
        int t2=2;
        if (n<=2){
            return n;
        }else{
            int temp=0;
            for (int i=3;i<=n;i++){
                temp=t1+t2;
                t1=t2;
                t2=temp;
            }
            return temp;
        }
    }
}
